cssimage: Make cross-fades cross-fade properly
authorBenjamin Otte <otte@redhat.com>
Fri, 14 Sep 2012 21:24:33 +0000 (17:24 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Fri, 14 Sep 2012 21:33:02 +0000 (17:33 -0400)
We need to use OPERATOR_SOURCE to properly fade out the start image
when the end image contains transparency.

gtk/gtkcssimagecrossfade.c

index f7f8a6312a63d6f5ee9fd10ef87f96ee7911d724..424703af85e7178dd280aeaa0368b583bb7eac52 100644 (file)
@@ -121,6 +121,7 @@ gtk_css_image_cross_fade_draw (GtkCssImage        *image,
                                                 cairo_get_target (cr),
                                                 width, height);
           cairo_set_source_surface (cr, surface, 0, 0);
+          cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
           cairo_paint_with_alpha (cr, cross_fade->progress);
           cairo_surface_destroy (surface);